#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Action.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;
class OutputPin;

/// <summary>
/// OpaqueAction
/// An OpaqueAction is an Action whose functionality is not specified within UML.
/// </summary>
class UMLMODEL_EXPORT OpaqueAction : public Action {

public: // Constructors and destructors
    explicit OpaqueAction(const QString& umlType="uml::OpaqueAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// bodys getter
    /// Provides a textual specification of the functionality of the Action, in one or
    /// more languages other than UML.
    /// </summary>
    vector<QString>& bodys();

    /// <summary>
    /// inputValues getter
    /// The InputPins providing inputs to the OpaqueAction.
    /// </summary>
    vector<shared_ptr<InputPin>>& inputValues();

    /// <summary>
    /// languages getter
    /// If provided, a specification of the language used for each of the body Strings.
    /// </summary>
    vector<QString>& languages();

    /// <summary>
    /// outputValues getter
    /// The OutputPins on which the OpaqueAction provides outputs.
    /// </summary>
    vector<shared_ptr<OutputPin>>& outputValues();

private: // Fields
    /// <summary>
    /// bodys
    /// Provides a textual specification of the functionality of the Action, in one or
    /// more languages other than UML.
    /// </summary>
    vector<QString> bodys_;

    /// <summary>
    /// inputValues
    /// The InputPins providing inputs to the OpaqueAction.
    /// </summary>
    vector<shared_ptr<InputPin>> inputValues_;

    /// <summary>
    /// languages
    /// If provided, a specification of the language used for each of the body Strings.
    /// </summary>
    vector<QString> languages_;

    /// <summary>
    /// outputValues
    /// The OutputPins on which the OpaqueAction provides outputs.
    /// </summary>
    vector<shared_ptr<OutputPin>> outputValues_;

};

} // namespace uml
